package com.atguigu.serviceedu.service;

import com.atguigu.serviceedu.entity.EduCourse;
import com.atguigu.serviceedu.entity.coursevo.CourseInfoVo;
import com.atguigu.serviceedu.entity.coursevo.CoursePublish;
import com.atguigu.serviceedu.entity.coursevo.CourseQueryVo;
import com.atguigu.serviceedu.entity.coursevo.CourseWebVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author xuan
 * @since 2020-04-14
 */
public interface EduCourseService extends IService<EduCourse> {

    String editCourse(CourseInfoVo courseInfo);

    CourseInfoVo getCourseInfoVo(String courseId);

    CoursePublish getCoursePublishById(String courseId);

    boolean deleteCourse(String courseId);

    boolean publish(String courseId);

    List<EduCourse> getHotCourses();

    List<EduCourse> selectByTeacherId(String id);

    Map<String, Object> pageListWeb(Page<EduCourse> pageParam, CourseQueryVo courseQuery);

    /**
     * 获取课程信息
     * @param id
     * @return
     */
    CourseWebVo selectInfoWebById(String id);

    /**
     * 更新课程浏览数
     * @param id
     */
    void updatePageViewCount(String id);
}
